Skip to content

Implement Batched Classification and Progress Logging#116

Merged
Gambitnl merged 1 commit intomainfrom
jules-classifier-batching-and-logging
Nov 23, 2025
Merged

Implement Batched Classification and Progress Logging#116
Gambitnl merged 1 commit intomainfrom
jules-classifier-batching-and-logging

Conversation

@google-labs-jules
Copy link
Copy Markdown
Contributor

Implemented batched classification and progress logging for the IC/OOC classification stage (Stage 6) to address performance bottlenecks and user feedback gaps.

Key Changes:

  1. Batched Classification (BUG-20251107-03):

    • Implemented classify_segments_batched in OllamaClassifier to process segments in chunks (default 10).
    • Created new JSON-array oriented prompts (classifier_batch_prompt_en.txt, _nl.txt).
    • Added robust error handling: if a batch fails (e.g., malformed JSON), it falls back to sequential classification for those segments to ensure data integrity.
    • Configurable via CLASSIFICATION_USE_BATCHING and CLASSIFICATION_BATCH_SIZE.
  2. Progress Logging (BUG-20251107-02):

    • Added periodic progress logging (every 20 segments) to StatusTracker and application logs.
    • Includes completion percentage and ETA estimation.
  3. Testing:

    • Verified with unit tests covering batched logic, fallback scenarios, and sequential logging.
    • Updated tests/test_classifier.py and removed temporary tests/test_classifier_v2.py.
  4. Fixes:

    • Fixed missing imports (re, time) in src/classifier.py.
    • Updated ClassificationResult.to_dict to include missing fields.

PR created automatically by Jules for task 12799264901023550111 started by @Gambitnl

- Add progress logging to `OllamaClassifier` (both sequential and batched).
- Implement batched classification with JSON-array output prompts.
- Add configuration for batching (`CLASSIFICATION_USE_BATCHING`, `CLASSIFICATION_BATCH_SIZE`).
- Update `StatusTracker` to show granular progress.
- Fix imports and ensure robust fallback to sequential classification on batch failure.
- Update tests to cover new functionality.
- Address BUG-20251107-02 and BUG-20251107-03.
@google-labs-jules
Copy link
Copy Markdown
Contributor Author

👋 Jules, reporting for duty! I'm here to lend a hand with this pull request.

When you start a review, I'll add a 👀 emoji to each comment to let you know I've read it. I'll focus on feedback directed at me and will do my best to stay out of conversations between you and other bots or reviewers to keep the noise down.

I'll push a commit with your requested changes shortly after. Please note there might be a delay between these steps, but rest assured I'm on the job!

For more direct control, you can switch me to Reactive Mode. When this mode is on, I will only act on comments where you specifically mention me with @jules. You can find this option in the Pull Request section of your global Jules UI settings. You can always switch back!


For security, I will only act on instructions from the user who triggered this task.

New to Jules? Learn more at jules.google/docs.

@Gambitnl Gambitnl marked this pull request as ready for review November 23, 2025 14:31
@Gambitnl Gambitnl merged commit 120d891 into main Nov 23, 2025
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant